import { defineStore } from 'pinia';

export const useUserStore = defineStore('user', {
  state: () => ({
    id: localStorage.getItem('id'),
    role: localStorage.getItem('role'),
  }),
  getters: {
    minDev: state => state.role === 'dev',
    minAdmin: state => state.role === 'admin' || state.role === 'dev',
  },
  actions: {},
});
